//; // 榮諭開單卡控 - 開關使用 by Andy 20221107 function getAPKVaildation(){ return "Y" }; // 榮諭舊系統開單卡控 ( 新系統轉至asrv開頭的伺服器;舊系統禁止開單使用 ) - 開關使用 by Andy 20230119 function getAPKOldVaildation(){ return "Y" }; // 是否為特殊人員,不卡控 function isSpecialPerson(empnotesid){ var isSpecial="N"; // 20230802 - 無例外人員直接鎖掉;APK的人員不可開單 // if(empnotesid=="CN=Hansen.wang/O=asphetek" | empnotesid=="CN=Owen.li/O=asphetek" | empnotesid=="CN=Luke.hu/O=asphetek" | empnotesid=="CN=Rose.yang/O=asphetek"){ // 王涵、胡路、李俊、楊茜 為展晶人員、apk帳號 - 需開立假勤相關系統 if(empnotesid=="CN=Luyu.pu/O=asphetek" | empnotesid=="CN=A8MFG01/O=asphetek" | empnotesid=="CN=Cynthia.hu/O=asphetek" | empnotesid=="CN=Ivy.chang/O=asphetek"){ // 許懷元待開榮創股務業務使用 by Andy 20240411 //更改為盧玉浦 20250310 byDaisy //加入胡越協助淑滿業務 by Andy 20251113 // Ivy 支援AOT車載業務 by Andy 20260121 isSpecial="Y"; } return isSpecial; } // 是否為特殊人員,不卡控(判斷 notes id 及檢驗message可自行調整版本) function checkVaildation(empnotesid){ var checkVaildation=""; // 空值,不卡控,如果有值就卡控 // 卡控如果是 msrvuser 的人員開立,進行檢核 - by Andy 20240424 if(empnotesid=="CN=mSrvUser/O=aot"){ checkVaildation="您目前使用的帳號是【mSrvUser】,請確認是否開單?"; } return checkVaildation; } //================ XML View 物件 ================ function xmlView(argServer, argDbPath, argViewName) { this.ViewUrl = "" ; if(argServer != "") this.ViewUrl ='http://' + argServer ; if(argDbPath != "") this.ViewUrl =this.ViewUrl + '/' + argDbPath ; if(argViewName !="") this.ViewUrl =this.ViewUrl+'/'+argViewName+'?ReadViewEntries&Count=-1'; //alert (this.ViewUrl); this.xmlDoc =document.forms[0].MSXML; this.xmlDoc.URL =this.ViewUrl; this.setViewUrl =setViewUrl; // Method this.getEntryByDocUnid =getEntryByDocUnid; // Method this.getEntryByKey =getEntryByKey; // Method this.getEntryByField =getEntryByField; // Method } function SuperXmlView(argStrURL) { // 2005/10/27 Add By CoCo this.ViewUrl = "" ; this.ViewUrl = argStrURL ; this.xmlDoc =document.forms[0].MSXML; this.xmlDoc.URL = argStrURL ; //this.ViewUrl; this.setViewUrl =setViewUrl; // Method this.getEntryByDocUnid = getEntryByDocUnid; // Method this.getEntryByKey =getEntryByKey; // Method this.getEntryByField =getEntryByField; // Method } function setViewUrl(argUrl) { //---------------- XML View 物件 之 Method : setViewUrl ---------------- if (argUrl != this.ViewUrl) { this.ViewUrl = argUrl; this.xmlDoc.URL =this.ViewUrl; } return; } function getEntryByDocUnid(argDocUnid) { //---------------- XML View 物件 之 Method : getEntryByDocUnid ---------------- var RootElem = this.xmlDoc.root; if (RootElem == null) return; var ViewChildren = RootElem.children; var ViewItems = ViewChildren.length; //alert('ViewItems='+ViewItems); var i = 0; do { var OneEntry = ViewChildren.item(i); if (OneEntry.getAttribute("UNID") == argDocUnid) { //alert('Found Entry'); return OneEntry; } i++; } while (i < ViewItems); return ; } function getEntryByKey(argValue) { //---------------- XML View 物件 之 Method : getEntryByKey ---------------- var RootElem = this.xmlDoc.root; if (RootElem == null) return; var ViewChildren = RootElem.children; var ViewItems = ViewChildren.length; //alert('ViewItems='+ViewItems); var i = 0; do { var OneEntry = ViewChildren.item(i); var EntryChildren = OneEntry.children; var FieldItems = EntryChildren.length; //alert('FieldItems='+FieldItems); if (FieldItems == 0) return ; if (EntryChildren.item(0).text == argValue) { //alert('Found Entry By Key='+argValue); return OneEntry ; } i++; } while (i < ViewItems); return ; } function getEntryByField(argFieldName, argValue) { //---------------- XML View 物件 之 Method : getEntryByField ---------------- var RootElem = this.xmlDoc.root; if (RootElem == null) return; var ViewChildren = RootElem.children; var ViewItems = ViewChildren.length; //?? //alert('ViewItems='+ViewItems); var i = 0; do { var OneEntry = ViewChildren.item(i); var EntryChildren = OneEntry.children; var FieldItems = EntryChildren.length; var j = 0; do { var OneField = EntryChildren.item(j); if (OneField.getAttribute("NAME") == argFieldName) { if (OneField.text == argValue) { //alert('Found Entry By Field='+argFieldName); return OneEntry ; } } j++; } while (j < FieldItems); i++; } while (i < ViewItems); return ; } //================ XML View Entry 物件 ================ function xmlEntry() { this.Entry ; this.getFieldValue =getFieldValue; } function getFieldValue(argFieldName) { //---------------- XML View Entry 物件 之 Method ---------------- if (this.Entry == null) return; var EntryChildren = this.Entry.children; var FieldItems = EntryChildren.length; //alert('FieldItems='+FieldItems); var j = 0; do { var OneField = EntryChildren.item(j); if (OneField.getAttribute("NAME") == argFieldName) { //alert('Found Field='+OneField.text); return OneField.text; } j++; } while (j < FieldItems); return ; }